package ooexercise04;
public class Chick extends Animal{
    Chick(String name,String color,int age){
        super(name,color,age);
    }

    void eat(){
        System.out.println(color+"色的"+age+"岁小鸡"+name+"在吃小米……");
    }

    void layEgg(){
        System.out.println(color+"色的"+age+"岁小鸡"+name+"在下蛋……");
    }
}





/*
public class Chick extends Animal{
    Chick(String name,String color,int age){
        super(name,color,age);
    }

    void eat() {
        System.out.println(color + "色的" + age + "岁小鸡" + name + "在吃小米……");
    }

    void layEgg(){
        System.out.println(color+"色的"+age+"岁小鸡"+name+"在下蛋……");
    }
}

 */
